<template>
  <div class="content-card">
      <div class="card">
          <div class="goods-info" v-for="(item,index) in compData.data.goodsList" :key="index">
             <div class="goods-img-div sa-flex-row ss-row-center ss-col-center">
                <sa-preview :url="item.image" size="52"></sa-preview>
             </div>
             <div class="goods-title">
              双枪筷子20无漆无蜡天然毛竹sdsdgsdgsdgsd
             </div>
             <div class="goods-price">
                仅需：¥9.9
             </div>
          </div>
      </div>
  </div>
</template>

<script setup>
import { computed, onMounted } from 'vue';
import { checkUrl } from '@/sheep/utils/checkUrlSuffix';
const imgUrl = import.meta.env.SHEEP_IMG_URL
const props = defineProps(['compData']);


onMounted(() => {
  console.log('props.compData', props.compData)
})

</script>
<style lang="scss" scoped>
.content-card {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 204px;
  .card{
    margin-top: 30px;
    margin-left: 11px;
    margin-right: 15px;
    height:130px;
    width: calc(100% - 11px - 15px);
    z-index: 100;
    padding-left: 10px;
    padding-right: 10px;
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
    .goods-info{
     
      padding-left: 10px;
      padding-right: 10px;
      width:100px;
      height:100%;
      display: flex;
      flex-direction: column;
      justify-content: flex-start;
      align-items: center;
      .goods-img-div{
        width:52px;
        height:52px;
      }
      .goods-title{
        margin-top: 5px;
        width: 80px;
        height: 40px;
        font-family: PingFang SC;
        font-weight: bold;
        font-size: 10px;
        color: #2C59BC;
        line-height: 20px;
        text-align: center;

        text-overflow: -o-ellipsis-lastline;
        overflow: hidden;
        text-overflow: ellipsis;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        -webkit-box-orient: vertical;

      }
      .goods-price{
        position: relative;
        margin-top: 5px;
        width: 80px;
        height: 24px;
        background: linear-gradient(87deg, #E72929, #F76161);
        box-shadow: 1px 4px 6px 0px rgba(166,227,255,0.85), 1px 3px 5px 0px rgba(255,255,255,0.23);
        border-radius: 19px;
        border: 1px solid #94E2FF;

        font-family: Adobe Heiti Std;
        font-weight: normal;
        font-size: 12px;
        color: #FFFFFF;
        line-height: 12px;

        display:flex;
        justify-content: center;
        align-items: center;
      }

      .goods-price:before{
        content:'';
        width:0;
        height:0;
        border-right:6px solid transparent;
        border-bottom: 6px solid #EB3636;
        border-left:6px solid transparent;
        position:absolute;
        left:25%;
        top:0%;
        margin-top:-6px;
		}
    }

   
    .goods-info:nth-child(1){
      border-right: dashed 1px #50B4FA;
    }
    .goods-info:nth-child(2){
      border-right: dashed 1px #50B4FA;
    }
  }

}



.goods-img {
  width: 51px;
  height: 52px;

}

</style>
